import { createRouter, createWebHashHistory } from "vue-router";
import Home from "../views/home.vue";

const routes = [
    {
        path: '/',
        redirect: '/weather'
    },
    {
        path: "/",
        name: "Home",
        component: Home,
        children: [
            {
                path: "/weather",
                name: "weather",
                icon: "el-icon-lx-home",
                meta: {
                    title: '系统首页'
                },
                component: () => import( /* webpackChunkName: "weather" */ "../views/weather.vue")
            }
        ]
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;
